package b.i.c;

import android.content.Context;
import android.os.Build.VERSION;
import android.os.Process;

/* compiled from: ContextCompat */
public class a {
    public static final Object a = new Object();

    public static int a(Context context, String str) {
        if (str != null) {
            return context.checkPermission(str, Process.myPid(), Process.myUid());
        }
        throw new IllegalArgumentException("permission is null");
    }

    public static int b(Context context, int i) {
        if (VERSION.SDK_INT >= 23) {
            return context.getColor(i);
        }
        return context.getResources().getColor(i);
    }
}
